"""dataAnalysis URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.contrib import admin
from django.urls import path, include, re_path
from django.views.static import serve
from django.urls import reverse
from dataAnalysis import settings
from login import views

urlpatterns = [
    path('admin/', admin.site.urls),  # 后台管理页面
    path('', views.index, name='index'),  # 系统首页
    url(r'^login/', views.login),  # 登录页面
    url(r'^help/', views.help, name='help'),  # 帮助中心
    url(r'^contact/', views.contact, name='contact'),  # 联系我们
    url(r'^register/', views.register),  # 注册
    url(r'^logout/', views.logout),  # 登出
    url(r'^captcha', include('captcha.urls')),
    url(r'^visualization/', include('data_vis.urls')),  # 数据可视化
    url(r'^dataAnalysis/', include('data1.urls')),  # 数据分析
    url(r'^analysis/', views.analysis, name='analysis'),
    url(r'^test/', include('data_test.urls')),
    url(r'^blog/', include('blog.urls')),  # 数据社区
    url(r'^comm/', include('comments.urls')),  # 评论
    url(r'^ueditor/', include('DjangoUeditor.urls')),  # 添加DjangoUeditor的URL
    re_path('^media/(?P<path>.*)$', serve, {'document_root': settings.MEDIA_ROOT}),  # 增加此行,配置富文本编辑器显示图片

]
